#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_pushButton_up_clicked()
{
    QRect r = ui->pushButton_target->geometry();

    ui->pushButton_target->setGeometry(r.x(),r.y() - 10,r.width(),r.height());
}

void Widget::on_pushButton_down_clicked()
{
    QRect r = ui->pushButton_target->geometry();

    ui->pushButton_target->setGeometry(r.x(),r.y() + 10,r.width(),r.height());
}

void Widget::on_pushButton_left_clicked()
{
    QRect r = ui->pushButton_target->geometry();

    ui->pushButton_target->setGeometry(r.x() - 10,r.y(),r.width(),r.height());
}

void Widget::on_pushButton_right_clicked()
{
    QRect r = ui->pushButton_target->geometry();

    ui->pushButton_target->setGeometry(r.x() + 10,r.y(),r.width(),r.height());
}
